package com.quanyan.place.service;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.place.entity.Supplier;
import com.quanyan.place.entity.TbBizPlace;
import com.quanyan.place.entity.TbSupplier;
import com.quanyan.place.entity.apiresp.RespSupplierVo;
import com.quanyan.place.request.SupplierSearchRequest;

import java.util.List;

/**
 * Created by yangyun on 2016/4/14.
 */
public interface SupplierService {

    APIResponse addSupplier(Supplier supplier);

    APIResponse<?> getSupplierById(Integer supplierId);

    PageObj<List<RespSupplierVo>> supplierSearch(SupplierSearchRequest searchBean);

    APIResponse<?> deleteSupplier(Integer supplierId);

    /**
     * 供应商授权用户（支持多个用户）
     * @param supplierId
     * @param adminUserIds
     * @return
     */
    APIResponse<?> supplierRelateAdminUsers(Integer supplierId, List<Integer> adminUserIds);

    /**
     * 根据adminUserId查询供应商
     * @param adminUserId
     * @return
     */
    APIResponse<List<TbSupplier>> getSupplierListByAdminUid(Integer adminUserId);

    List<TbBizPlace> getPlaceListForSupplier(Integer supplierId);
}
